<?php
require("../config.php");
require_once($CONF['root.dir']."database.php");

if(strtoupper($_GET["modul"])=="EDIT"){
	$SQL="SELECT id_panitia, 
			id_pelamar, 
			nama, 
			jabatan
			FROM 
			tblpanitia where id_panitia='".$_GET["data"]."'";
	$conn->connect();
	$val=$conn->query($SQL);
	$val->next();
	
	$id_pelamar     = $val->get(1);
	$nama 		 	= $val->get(2);
	$jabatan 		= $val->get(3);
	$id_panitia 	= $val->get(0);
	
				
	$BUTTON="Update";
	$conn->connect();
}else{
	$BUTTON="Save";
	
}	
?>
<fieldset class="fieldbox">
<legend class="fieldbox">Form Panitia</legend>
<form id="frmPanitia" name="frmPanitia" method="post" onsubmit="return SaveForm('frmPanitia','SubModules/postPanitia.php');" autocomplete="off">
<input type="hidden" name="ACTION" id="ACTION" value="<?php echo $BUTTON?>" />
<input type="hidden" name="DATA" id="DATA" value="<?php echo $_GET["data"]?>" />
<table width="100%" border="0" cellpadding="2px" cellspacing="1px">
<tr><td>
   <table width="100%" border="0" cellpadding="3px" cellspacing="0">
    	<tr>	
            <td width="30%">ID Pelamar</td>
            <td width="3%">:</td>
            <td width="70%"><input type="text" id="id_pelamar" name="id_pelamar" size="35" value="<?php echo $id_pelamar ?>" class="required"/></td>
        </tr>
        <tr>	
            <td width="30%">ID Panitia</td>
            <td width="3%">:</td>
            <td width="70%"><input type="text" id="id_panitia" name="id_panitia" size="35" value="<?php echo $id_panitia ?>" class="required"/></td>
        </tr>
        <tr>
            <td width="30%">Nama</td>
            <td width="3%">:</td>
            <td width="70%"><input type="text" id="nama" name="nama" size="35" value="<?php echo $nama ?>" class="required"/></td>
        </tr>
        <tr>
            <td width="30%">Jabatan</td>
            <td width="3%">:</td>
            <td width="70%"><input type="text" id="jabatan" name="jabatan" size="35" value="<?php echo $jabatan ?>" onmouseover="formdate('tgl_lahir')" class="required"/></td>
        </tr>
   
       
	 </table>
	</td></tr>
	<tr><td>&nbsp;</td></tr>
  	<tr>
       <td>
               <input type="submit" value="Save" style="display:none;" />
            	<a href="javascript:void(0)" onclick="return SaveForm('frmPanitia','SubModules/postPanitia.php');"
                		class="fg-button fg-button-icon-left ui-corner-all fg-button-bg">
                    <span class="ui-icon ui-icon-disk"></span>
                    <? echo $BUTTON ?>
                </a>
                <a href="javascript:void(0)" onclick="ResetForm('#result','frmPanitia')" 
                		class="fg-button fg-button-icon-left ui-corner-all fg-button-bg">
                    <span class="ui-icon ui-icon-closethick"></span>
                    Clear
                </a>
            </td>
        </tr>
		<tr><td>&nbsp;</td></tr>
</table>
</form>
<div id="result" style="display:none;" class=""></div>
</fieldset>
